package com.dingup.homework.service;

import com.dingup.homework.bean.DO.CorrectTeacher;
import com.dingup.homework.bean.DO.HwHomeworkDO;
import com.dingup.homework.bean.DTO.HwHomeworkDTO;

import java.util.List;

/**
 * @author jun 2018/11/8.
 */
public interface HwHomeworkService {
    /**
     * 添加作业
     *
     * @param hwHomeworkDO HwHomeworkDO
     * @return Boolean
     */
    Boolean add(HwHomeworkDO hwHomeworkDO);

    /**
     * 编辑作业
     *
     * @param hwHomeworkDO HwHomeworkDO
     * @return Boolean
     */
    Boolean update(HwHomeworkDO hwHomeworkDO);

    /**
     * 获取普通作业列表(不包含历史作业)
     *
     * @return List<HwHomeworkDO>
     */
    List<HwHomeworkDTO> listNormalHomework(String userId);

    /**
     * 获取历史作业列表
     *
     * @return List<HwHomeworkDO>
     */
    List<HwHomeworkDTO> listHistoryHomework(String userId);

    /**
     * 根据id获取作业
     *
     * @param id Integer
     * @return HwHomeworkDO
     */
    HwHomeworkDTO getById(Integer id);

    /**
     * 根据id删除作业
     *
     * @param id Integer
     * @return Boolean
     */
    Boolean delete(Integer id);

    /**
     * 分发作业
     *
     * @param id Integer
     * @return HwHomeworkDO
     */
    Boolean assignHomework(Integer id);

    /**
     * 修改作业的批改老师
     *
     * @param id
     * @param correctTeacher
     * @return
     */
    Boolean updateCorrectTeacher(Integer id, CorrectTeacher correctTeacher);

    Integer getExpireCountFromYesterday(String userId);
}
